package com.cans.lightning.business.lowcode.manager.form.loader.formBean;

import com.cans.lightning.business.lowcode.manager.form.bean.AppFormBean;
import com.cans.lightning.business.lowcode.manager.form.loader.AbstractBeanLoader;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author cans
 * @date 2023/11/29
 **/
@Component
public class FormBeanLoaderBuilder {

    @Resource
    private BeanBaseLoader formBeanBaseLoader;
    @Resource
    private BeanTableLoader formBeanTableLoader;
    @Resource
    private BeanViewLoader beanViewLoader;
    @Resource
    private FormBeanEndLoader formBeanEndLoader;


    public AbstractBeanLoader<AppFormBean> getLoader(){
        AbstractBeanLoader<AppFormBean> appFormBeanAbstractBeanLoader = formBeanBaseLoader.nextLoader(formBeanTableLoader)
                .nextLoader(beanViewLoader);


        appFormBeanAbstractBeanLoader.nextLoader(formBeanEndLoader);
        return formBeanBaseLoader;
    }
}
